package com.llc.mall.product.application.command.service.impl;

import com.llc.mall.product.application.command.commands.AddSpuCmd;
import com.llc.mall.product.application.command.convert.SpuConvert;
import com.llc.mall.product.application.command.service.SpuAppService;
import com.llc.mall.product.domain.spu.objectvalue.SpuProfile;
import com.llc.mall.product.domain.spu.service.SpuDomainService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class SpuAppServiceImpl implements SpuAppService {

    @Resource
    private SpuDomainService spuDomainService;

    @Override
    public void addSpu(AddSpuCmd addSpuCmd) {

        SpuProfile spuProfile = SpuConvert.convert(addSpuCmd);
        spuDomainService.addSpu(spuProfile);

    }
}
